<!--
 * @Author: 清香白莲 1243327527@qq.com
 * @Date: 2023-08-11 16:18:20
 * @LastEditors: 清香白莲 1243327527@qq.com
 * @LastEditTime: 2023-09-07 15:22:37
 * @FilePath: /shang_study/src/pages/Home/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <TypeNav />
    <ListContainer />
    <Recommend />
    <Rank />
    <Like />
    <Floor v-for="floor in floorList" :key="floor.id" :floor="floor"></Floor>
    <Brand />
  </div>
</template>

<script>
// 三级组件已经全局引入，不需要再次引入了。但是我目前全局导入有问题。
import TypeNav from '@/pages/Home/TypeNav'
import ListContainer from '@/pages/Home/ListContainer'
import Recommend from '@/pages/Home/Recommend'
import Rank from '@/pages/Home/Rank'
import Like from '@/pages/Home/Like'
import Floor from '@/pages/Home/Floor'
import Brand from '@/pages/Home/Brand'

import { mapState } from 'vuex';

export default {
  name: 'sHome',
  components: {
    TypeNav,
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
  mounted() {
    this.$store.dispatch('home/getFloorList');
  },
  computed: {
        ...mapState('home', ['floorList']),
    }
}
</script>

<style></style>